import 'package:flutter/material.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class MyRefreshHeader extends ClassicHeader {
  const MyRefreshHeader({
    key,
    RefreshStyle refreshStyle: default_refreshStyle,
    double height: 60.0,
    Duration completeDuration: const Duration(milliseconds: 600),
    outerBuilder,
    textStyle: const TextStyle(color: const Color(0xff555555)),
    refreshingText: '刷新中...',
    releaseText: '松开刷新',
    idleText: '下拉刷新',
    completeText: '加载成功',
    failedText: '加载失败',
    canTwoLevelText: '松开进入二楼',
    canTwoLevelIcon,
    twoLevelView,
    iconPos: IconPosition.left,
    spacing: 15.0,
    refreshingIcon,
    failedIcon: const Icon(Icons.error, color: Colors.grey),
    completeIcon: const Icon(Icons.done, color: Colors.grey),
    idleIcon = const Icon(Icons.arrow_downward, color: Colors.grey),
    releaseIcon = const Icon(Icons.arrow_upward, color: Colors.grey),
  }) : super(
          key: key,
          refreshStyle: refreshStyle,
          height: height,
          completeDuration: completeDuration,
          outerBuilder: outerBuilder,
          textStyle: textStyle,
          releaseText: releaseText,
          refreshingText: refreshingText,
          canTwoLevelIcon: canTwoLevelIcon,
          twoLevelView: twoLevelView,
          canTwoLevelText: canTwoLevelText,
          completeText: completeText,
          failedText: failedText,
          idleText: idleText,
          iconPos: iconPos,
          spacing: spacing,
          refreshingIcon: refreshingIcon,
          failedIcon: failedIcon,
          completeIcon: completeIcon,
          idleIcon: idleIcon,
          releaseIcon: releaseIcon,
        );
}
